<?php 
include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/session_control_aspirante.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/dto/aspirante_dto.php");
include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/session_helper.php");



?>


<!DOCTYPE html>
<html lang="en">
<head>
<title>SITRABS -Buscar Oferta-</title>
<meta charset="utf-8">
<link href="../css/bootstrap.min3.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" media="screen"
	href="../css/bootstrap3-datetimepicker.css" />
 
      <script src="../js/jquery.min.js"></script> 

<script src="../js/bootstrap.min.js"></script>
<script src="../js/bootstrap3-datepicker.js"></script>



</head>

<body>

	<div class="container">
	<nav class="navbar navbar-default navbar-static">
        <div class="navbar-header">
            <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#b-menu-2">
                <span class="sr-only">Navegación</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand">Buscar Ofertas</a>
        </div>

        <!-- submenu elements for #b-menu-2 -->
        <div class="collapse navbar-collapse" id="b-menu-2">
          <ul class="nav navbar-nav">
 <li><a href="../home/home_aspirante.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li> <a href="../help_usaspir.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
           <li><a href="../action/action_logout.php"><span  class="glyphicon glyphicon-remove"></span>Cerrar Sesion</a></li>
        
            <li class="dropdown">
             <ul class="dropdown-menu">
 <li><a href="../home/home_aspirante.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>
            <li> <a href="../help_usaspir.html"><span class="glyphicon glyphicon-question-sign"></span> Ayuda</a></li>
           <li><a href="../action/action_logout.php"><span  class="glyphicon glyphicon-remove"></span>Cerrar Sesion</a></li>
           </ul>
            </li>
          </ul> 
        </div><!-- /.nav-collapse -->
      </nav>
	</div>
	<div class="container">

		<div class="span10 offset1">
		

			<form class="form-horizontal" action="../action/action_buscar_oferta_aspirante.php"
				method="post" enctype="multipart/form-data">
				<input type="hidden" name="idAspirante" value="<?php echo $id?>">
				<div class="row">
					<?php 
					

					if($msgExito != null){
					echo "<div class='alert alert-info'> " .$msgExito ." </div>";
				}

				if($msgError != null){
					echo "<div class='alert alert-warning'> " .$msgError ." </div>";
				}
					
					

				SessionHelper::clearMsg();
					
				?>

				</div>



				<div class="panel panel-default">
					<div class="panel-heading"> <h4>Buscar Ofertas! - Filtra tu busqueda </h4></div>
					<div class="panel-body">
						<div class='row'>
							<div class="col-md-6">
								<label class="control-label">Area Empresa</label> <select
									name="areaEmpresa" class="form-control" data-toggle="tooltip"
									data-placement="top" title="Filtra por Area">
									<?php 
									include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
									$esBusqueda = true;
									Combos::drawComboAreaEmpresa($esBusqueda);
									?>
								</select>
							</div>

							<div class="col-md-6">
								<label class="control-label">Cargo Solicitado</label> <select
									name="cargoSolicitado" class="form-control"
									data-toggle="tooltip" data-placement="top"
									title="Filtra por CargoSolicitado">
									<?php 
									include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
									$esBusqueda = true;
									Combos::drawComboCargo($esBusqueda);
									?>
								</select>
							</div>




						</div>
						<div class='row'>
						
							<div class="col-md-6">
								<label class="control-label">Rango Salarial</label> <select
									name="rangoSalarial" class="form-control" data-toggle="tooltip"
									data-placement="top" title="Filtra por Rango Salarial">
									<?php 
									include_once($_SERVER["DOCUMENT_ROOT"]."/bolsa_trabajo/util/combos.php");
									$esBusqueda = true;
									Combos::drawComboRangoSalarial($esBusqueda);
									?>
								</select>
							</div>
			

						</div>
						<div class="row">
							<div class="col-md-offset-4 col-md-8">

								<a class="btn btn-default navbar-btn" href="<?php echo $home?>">Regresar a Inicio</a>
								<button type="submit" class="btn btn-primary navbar-btn"
									name="action" value="load">Buscar</button>
							</div>

						</div>
					</div>
					<div class="table-responsive"> 
					<table class="table table-condensed table-hover">
					<?php 
						if (isset($_SESSION['resultadoBusqueda'])) {
							$res = $_SESSION['resultadoBusqueda'];
							echo $res;
							unset($_SESSION['resultadoBusqueda']);
							}
						?>
					</table>
					</div>
				</div>
			</form>
		</div>

		<div class="span10 offset1"></div>

	</div> <script type="text/javascript" src="js/bootstrap.min.js"></script> 


 <script type="text/javascript" src="../js/bootstrap.min.js"></script> 
	<!-- /container -->
</body>
</html>
